package com.springboot.dto;

import com.springboot.model.DoctorFieldForm;
import com.springboot.model.DoctorInfoForm;
import com.springboot.model.MessageInform;

import java.text.SimpleDateFormat;

/**
 * 患者消息通知视图
 */
public class MessageView {
    private MessageInform messageInform;
    private DoctorInfoForm doctorInfoForm;
    private DoctorFieldForm doctorFieldForm;
    private String patientName;
    private String messageDateTime;

    public MessageView() {
    }

    public MessageView(MessageInform messageInform, DoctorInfoForm doctorInfoForm,
                       DoctorFieldForm doctorFieldForm, String patientName) {
        this.messageInform = messageInform;
        this.doctorInfoForm = doctorInfoForm;
        this.doctorFieldForm = doctorFieldForm;
        this.patientName = patientName;
        SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        this.messageDateTime = sdf.format(messageInform.getMessageDatetime());
    }

    public MessageView(MessageInform messageInform, DoctorInfoForm doctorInfoForm, DoctorFieldForm doctorFieldForm,
                       String patientName, String messageDateTime) {
        this.messageInform = messageInform;
        this.doctorInfoForm = doctorInfoForm;
        this.doctorFieldForm = doctorFieldForm;
        this.patientName = patientName;
        this.messageDateTime = messageDateTime;
    }

    public MessageInform getMessageInform() {
        return messageInform;
    }

    public void setMessageInform(MessageInform messageInform) {
        this.messageInform = messageInform;
    }

    public DoctorInfoForm getDoctorInfoForm() {
        return doctorInfoForm;
    }

    public void setDoctorInfoForm(DoctorInfoForm doctorInfoForm) {
        this.doctorInfoForm = doctorInfoForm;
    }

    public DoctorFieldForm getDoctorFieldForm() {
        return doctorFieldForm;
    }

    public void setDoctorFieldForm(DoctorFieldForm doctorFieldForm) {
        this.doctorFieldForm = doctorFieldForm;
    }

    public String getPatientName() {
        return patientName;
    }

    public void setPatientName(String patientName) {
        this.patientName = patientName;
    }

    public String getMessageDateTime() {
        return messageDateTime;
    }

    public void setMessageDateTime(String messageDateTime) {
        this.messageDateTime = messageDateTime;
    }
}
